/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

export default class Prefix {
    static BLOCK_LENGTH_OFFSET: Int32Array = new Int32Array([
        1, 5, 9, 13, 17, 25, 33, 41, 49, 65, 81, 97, 113, 145, 177, 209, 241, 305, 369, 497,
        753, 1265, 2289, 4337, 8433, 16625]);
    static BLOCK_LENGTH_N_BITS: Int32Array = new Int32Array([
        2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 24]);
    static INSERT_LENGTH_OFFSET: Int32Array = new Int32Array([
        0, 1, 2, 3, 4, 5, 6, 8, 10, 14, 18, 26, 34, 50, 66, 98, 130, 194, 322, 578, 1090,
        2114, 6210, 22594]);
    static INSERT_LENGTH_N_BITS: Int32Array = new Int32Array([
        0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 12, 14, 24]);
    static COPY_LENGTH_OFFSET: Int32Array = new Int32Array([
        2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 18, 22, 30, 38, 54, 70, 102, 134, 198, 326,
        582, 1094, 2118]);
    static COPY_LENGTH_N_BITS: Int32Array = new Int32Array([
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 24]);
    static INSERT_RANGE_LUT: Int32Array = new Int32Array([0, 0, 8, 8, 0, 16, 8, 16, 16]);
    static COPY_RANGE_LUT: Int32Array = new Int32Array([0, 8, 0, 8, 16, 0, 16, 8, 16]);

    constructor() {
    }
}